package com.jep;

import com.singularsys.jep.EvaluationException;
import com.singularsys.jep.Jep;
import com.singularsys.jep.ParseException;


public class JepTest {
	
	public static void main(String[] args) {
		
//		JEP jep = new JEP();
//		String exp = "1-6*8";
//		System.out.println(jep.evaluate(jep.parse(exp)));
		
		Jep jep = new Jep();
		String exp = "1-6*8";
		try {
			jep.parse(exp);
			System.out.println(jep.evaluate());
		} catch (EvaluationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
